﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace A2DFramework.BusinessExceptionService.Exceptions
{
    /// <summary>
    /// 规则定义
    /// </summary>
    public class Rule
    {
        /// <summary>
        /// 规则适用类型：属性或class
        /// </summary>
        public RuleType RuleType { get; set; }

        /// <summary>
        /// 规则失败时的动作
        /// </summary>
        public FailAction FailAction { get; set; }

        /// <summary>
        /// 规则针对的属性名称
        /// </summary>
        public string PropertyName { get; set; }

        /// <summary>
        /// 失败时相应的错误消息格式
        /// </summary>
        public string ErrorMessage { get; set; }

        /// <summary>
        /// 规则内容
        /// </summary>
        public string RuleContent { get; set; }
    }
}
